package com.atguigu.lease.web.app.mapper;

import com.atguigu.lease.model.entity.RoomInfo;
import com.atguigu.lease.web.app.vo.room.RoomItemVo;
import com.atguigu.lease.web.app.vo.room.RoomQueryVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.math.BigDecimal;

/**
* @author liubo
* @description 针对表【room_info(房间信息表)】的数据库操作Mapper
* @createDate 2023-07-26 11:12:39
* @Entity com.atguigu.lease.model.entity.RoomInfo
*/
public interface RoomInfoMapper extends BaseMapper<RoomInfo> {

    /**
     * @author gengjian
     * @date 2024/12/12 23:21:53
     * 分页查询房间vo(房间图片列表,房间标签列表,房间所属公寓信息)
     */
    IPage<RoomItemVo> pageRoomItemVoByQuery(IPage<RoomItemVo> iPage, RoomQueryVo queryVo);

    /**
     * @author gengjian
     * @date 2024/12/15 16:29:20
     * 根据公寓id分页查询房间列表vo
     */
    IPage<RoomItemVo> pageItemByApartmentId(IPage<RoomItemVo> page, Long id);

    /**
     * @author gengjian
     * @date 2024/12/15 17:44:07
     * 根据公寓id找出房间租金最小值
     */
    BigDecimal selectMinRentByApartmentId(Long id);
}